package com.wicket.okrapp.biz.service.nb;

import cn.hutool.core.bean.BeanUtil;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.stereotype.Service;
import com.wicket.okrapp.biz.service.dto.req.ObtainMaxOfCollectionsReqDto;
import com.wicket.okrapp.biz.service.dto.res.ObtainMaxOfCollectionsRespDto;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import com.wicket.okrapp.biz.service.dto.req.ImplementAccessParameterBizFieldReqDto;
import com.wicket.okrapp.biz.service.dto.res.ImplementAccessParameterBizFieldRespDto;
import com.wicket.okrapp.biz.service.dto.req.ImplementElevenReceivingFieldReqDto;
import com.wicket.okrapp.biz.service.dto.res.ImplementElevenReceivingFieldRespDto;

/**
 * @author ： 手工接入方法
 * @since 2022/5/28 15:32
 *
 *
 * @version 1.0
 */
@Service
public class NbUnstructuredData {
/**
      * code:maxOfMultipleNumAddOne
      * name:M3-获取取数据集最大值（特殊方法）
      * desc:undefined
      * gen by moon at 8/29/2022, 1:04:49 AM
      * 
      **/
     @Trace(operationName = "M3-获取取数据集最大值（特殊方法）")
     @Tags({@Tag(key = "参数",value = "arg[0]"),
     @Tag(key = "返回值",value = "returnedObj")})
      public ObtainMaxOfCollectionsRespDto obtainMaxOfCollections(ObtainMaxOfCollectionsReqDto reqDto) {
         ObtainMaxOfCollectionsRespDto retData = new ObtainMaxOfCollectionsRespDto();
         if(reqDto.getBusAppDocRelaList()==null || reqDto.getBusAppDocRelaList().size()==0){
             retData.setOrderNumber(1L);
             return retData;
         }
         retData.setOrderNumber(Collections.max(reqDto.getBusAppDocRelaList())+1);
        return retData;
      }
/**
      * code:receptionService
      * name:M3接收入参业务字段
      * desc:undefined
      * gen by moon at 3/8/2023, 3:27:23 AM
      * 
      **/
     @Trace(operationName = "M3接收入参业务字段")
     @Tags({@Tag(key = "参数",value = "arg[0]"),
     @Tag(key = "返回值",value = "returnedObj")})
      public ImplementAccessParameterBizFieldRespDto implementAccessParameterBizField(ImplementAccessParameterBizFieldReqDto reqDto) {
         return BeanUtil.toBean(reqDto,ImplementAccessParameterBizFieldRespDto.class);
      }
/**
      * code:receptionService
      * name:M3-接收入参字段
      * desc:undefined
      * gen by moon at 6/9/2024, 4:35:56 PM
      *
      **/
     @Trace(operationName = "M3-接收入参字段")
     @Tags({@Tag(key = "参数",value = "arg[0]"),
     @Tag(key = "返回值",value = "returnedObj")})
      public ImplementElevenReceivingFieldRespDto implementElevenReceivingField(ImplementElevenReceivingFieldReqDto reqDto) {
         return BeanUtil.toBean(reqDto,ImplementElevenReceivingFieldRespDto.class);
      }
  //手工接入方法
}
